<template>
	<view v-if="pageShow">
		<view class="" style="padding-bottom: 140rpx;">
			<u-swiper radius="0" :list="dataAll.images_text" circular height="375"></u-swiper>
			<view class="mainpadding">
				<view class="ffffff radius mainpadding">
					<view class="titletext xiaocheng fonweight">￥{{dataAll.price}}</view>
					<view class="titletext xiaohei margin_top">{{dataAll.name}}</view>
				</view>
				<view class="ffffff radius mainpadding margin_top">
					<view class="sanshier xiaohei textcenter">商品详情</view>
					<view class="margin_top">
						<u-parse :content="dataAll.content"></u-parse>
					</view>
				</view>
			</view>
		</view>
		<view class="gudingdb ffffff mainpadding " @click="querendd">
			<view class="bigbtny">立即订</view>
		</view>
	</view>
</template>

<script>
	const httpRequest = require("@/common/httpRequest.js")
	export default {
		data() {
			return {
				listid: "",
				dataAll: {},
				pageShow:false,
			}
		},
		onLoad(options) {
			this.listid = options.id
			this.getDetail()
		},
		methods: {
			getDetail() {
				httpRequest.request('/api/carshopcl/carshopGoodsDetail', 'GET', {
					id: this.listid
				}, false, false, true).then(res => {
					res.data.content = res.data.content ? res.data.content.replace(/\<img/gi,
						'<img class="baifenbai" style="display:block;" ') : "";
					this.dataAll = res.data
					this.pageShow = true
				})
			},
			// 跳转车辆参数
			tzcl() {
				uni.navigateTo({
					url: '/pages_index/chengliancs'
				})
			},
			querendd(){
				if (!httpRequest.checkIsLogin()) {
					uni.navigateTo({
						url: "/pages/login/login"
					})
					return false
				}
				uni.navigateTo({
					url:"/pages_index/fuwuqrdd?id="+this.listid
				})
			},
			
		}
	}
</script>

<style lang="scss" scoped>
	.tjbtn {
		width: 303rpx;
		height: 96rpx;
		background: #FF8505;
		border-radius: 12rpx 12rpx 12rpx 12rpx;
		font-weight: 800;
		font-size: 28rpx;
		color: #FFFFFF;
	}

	.quxbtn {
		width: 303rpx;
		height: 96rpx;
		background: #EAEAEA;
		border-radius: 12rpx 12rpx 12rpx 12rpx;
		font-weight: 800;
		font-size: 28rpx;
		color: #000000;
	}

	.textarea {
		background: #F3F3F3;
		border-radius: 16rpx 16rpx 16rpx 16rpx;
		padding: 30rpx;
	}

	.inputs {
		border-radius: 12rpx 12rpx 12rpx 12rpx;
		border: 2rpx solid #E8E8E8;
		padding: 25rpx 30rpx;
		width: 570rpx;
	}

	.wxzxbtn {
		font-weight: 500;
		font-size: 28rpx;
		color: #999999;
		width: 198rpx;
		height: 80rpx;
		background: #F7F9FA;
		border-radius: 41rpx 41rpx 41rpx 41rpx;
	}

	.yixxbtn {
		font-weight: 500;
		font-size: 28rpx;
		color: #FF8505;
		width: 198rpx;
		height: 80rpx;
		background: #fff3e6;
		border-radius: 41rpx 41rpx 41rpx 41rpx;
	}

	.zbbtn {
		font-weight: 500;
		font-size: 30rpx;
		color: #FF8505;
		width: 338rpx;
		height: 80rpx;
		background: rgba(255, 147, 65, 0.1);
		border-radius: 12rpx 12rpx 12rpx 12rpx;
		border: 1rpx solid #FF8505;
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.xiahuaxian:last-child {
		border-bottom: none;
		padding-bottom: 0;
	}

	.lvdian {
		width: 10rpx;
		height: 10rpx;
		background: #2D9070;
		border-radius: 50%;
	}

	.huandian {
		width: 10rpx;
		height: 10rpx;
		background: #FF8505;
		border-radius: 50%;
	}

	.wxzbtn {
		width: 118rpx;
		height: 53rpx;
		background: #EFEFEF;
		border-radius: 8rpx 8rpx 8rpx 8rpx;
		font-weight: 500;
		font-size: 24rpx;
		color: #333333;
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.yixbtn {
		width: 118rpx;
		height: 53rpx;
		background: rgba(255, 133, 5, 0.1);
		border-radius: 8rpx 8rpx 8rpx 8rpx;
		border: 1rpx solid #FF8505;
		font-weight: 500;
		font-size: 24rpx;
		color: #FF8505;
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.xhbtn {
		width: 135rpx;
		height: 58rpx;
		border-radius: 8rpx 8rpx 8rpx 8rpx;
		border: 1rpx solid #FF8505;
		font-weight: 500;
		font-size: 24rpx;
		color: #FF8505;
	}
</style>